<%@ Assembly Name="Starznet.SharePoint.SPDAT, Version=1.0.0.0, Culture=neutral, PublicKeyToken=74e3ac9236a77c47" %>
<%@ Page Language="C#" Inherits="Starznet.SharePoint.SPDAT.ApplicationPages.Settings.CAMLHelperPage" MasterPageFile="~/_layouts/application.master" EnableViewState="true" EnableViewStateMac="true" %>
<%@ Register TagPrefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="~/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="~/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="~/_controltemplates/ButtonSection.ascx" %>
<asp:Content ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
    <SharePoint:EncodedLiteral ID="EncodedLiteral1" runat="server" Text="<%$Resources:szadm,CAMLHelper_PageTitle%>" EncodeMethod="HtmlEncode" />
</asp:Content>
<asp:Content ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
    <SharePoint:EncodedLiteral ID="EncodedLiteral2" runat="server" Text="<%$Resources:szadm,CAMLHelper_PageTitle%>" EncodeMethod="HtmlEncode" />
</asp:Content>
<asp:Content ContentPlaceHolderID="PlaceHolderPageDescription" runat="server">
    <SharePoint:EncodedLiteral ID="EncodedLiteral3" runat="server" Text="<%$Resources:szadm,CAMLHelper_PageDesc%>" EncodeMethod="HtmlEncode" />
</asp:Content>
<asp:Content ContentPlaceHolderID="PlaceHolderPageImage" runat="server">
	<a href="http://www.starznet.co.uk" title="Visit the Starznet website" target="_blank">
	    <img src="/_layouts/Starznet/StarznetPageGraphic.gif" alt="Starznet Ltd" style="margin-top:3px;border:0px;"/>
	</a>
</asp:Content>
<asp:Content ContentPlaceHolderID="PlaceHolderMain" runat="server">
 <table class="propertysheet" border="0" width="100%" cellspacing="0" cellpadding="0">
    <wssuc:InputFormSection 
        Title="<%$Resources:szadm,CAMLHelper_SelListLabel%>"
		Description="<%$Resources:szadm,CAMLHelper_SelListDesc%>"
		runat="server">
	   <Template_InputFormControls>
			<wssuc:InputFormControl LabelText="<%$Resources:szadm,CAMLHelper_SelListLabel%>" runat="server">
				 <Template_Control>
    				 <div style="height:150px;overflow:scroll;">
		                <asp:DataList ID="dlLists" runat="server" RepeatColumns="3" RepeatDirection="Horizontal" CssClass="ms-listviewtable"
                         ItemStyle-CssClass="ms-vb2" ItemStyle-Width="33%" Width="600px">
                            <ItemTemplate>
                                <img src='<%#DataBinder.Eval(Container.DataItem, "ListImage")%>' alt='<%#DataBinder.Eval(Container.DataItem, "Title")%>' style="border:0px;width:16px;height:16px;" />&nbsp;
                                <a class="" href='CAMLHelper.aspx?ListId=<%#DataBinder.Eval(Container.DataItem, "ListID")%>'>
                                    <%#DataBinder.Eval(Container.DataItem, "Title")%>
                                </a>
                            </ItemTemplate>
                        </asp:DataList>
                    </div>
				 </Template_Control>
			</wssuc:InputFormControl>
	   </Template_InputFormControls>
    </wssuc:InputFormSection>
    <wssuc:InputFormSection 
        Title="<%$Resources:szadm,CAMLHelper_SelFieldLabel%>"
		Description="<%$Resources:szadm,CAMLHelper_SelFieldDesc%>"
		runat="server">
	   <Template_InputFormControls>
			<wssuc:InputFormControl LabelText="<%$Resources:szadm,CAMLHelper_SelFieldLabel%>" runat="server">
				 <Template_Control>
				    <asp:ListBox ID="lbFields" runat="server" SelectionMode="Single" Rows="6" AutoPostBack="true" />
	            </Template_Control>
			</wssuc:InputFormControl>
	   </Template_InputFormControls>
    </wssuc:InputFormSection>
    <wssuc:InputFormSection 
        Title="<%$Resources:szadm,CAMLHelper_AddWhereLabel%>"
		Description="<%$Resources:szadm,CAMLHelper_AddWhereDesc%>"
		runat="server">
	   <Template_InputFormControls>
			<wssuc:InputFormControl LabelText="<%$Resources:szadm,CAMLHelper_BoolLabel%>" runat="server">
				 <Template_Control>
				    <asp:RadioButtonList ID="rbBoolOpList" runat="server" RepeatDirection="Horizontal" RepeatLayout="flow">
                        <asp:ListItem Text="And" Value="And" Selected="True" />
                        <asp:ListItem Text="Or" Value="Or" />
                    </asp:RadioButtonList>
	            </Template_Control>
			</wssuc:InputFormControl>
			<wssuc:InputFormControl LabelText="<%$Resources:szadm,CAMLHelper_CompareLabel%>" runat="server">
				 <Template_Control>
				    <asp:DropDownList ID="ddFilterType" runat="server">
                        <asp:ListItem Text="Equal" Value="Eq" />
                        <asp:ListItem Text="Not Equal" Value="Neq" />
                        <asp:ListItem Text="Greater Than" Value="Gt" />
                        <asp:ListItem Text="Greater Than or Equal" Value="Geq" />
                        <asp:ListItem Text="Less Than" Value="Lt" />
                        <asp:ListItem Text="Less Than or Equal" Value="Leq" />
                        <asp:ListItem Text="Is Null" Value="IsNull" />
                        <asp:ListItem Text="Is Not Null" Value="IsNotNull" />
                        <asp:ListItem Text="Begins With" Value="BeginsWith" />
                        <asp:ListItem Text="Contains" Value="Contains" />
                    </asp:DropDownList>
	            </Template_Control>
			</wssuc:InputFormControl>
			<wssuc:InputFormControl LabelText="<%$Resources:szadm,CAMLHelper_FilterValueLabel%>" runat="server">
				 <Template_Control>
				    <asp:TextBox ID="txtFilterValue" runat="server"></asp:TextBox>&nbsp;<asp:Label ID="lblFieldType" runat="server" Visible="false"></asp:Label><br />
				    <asp:Button CssClass="ms-ButtonHeightWidth" Enabled="false" ID="CmdAddWhere" runat="server" Text="<%$Resources:szadm,CAMLHelper_CmdAddWhere%>" OnClick="cmdAddWhere_Click" />
	            </Template_Control>
			</wssuc:InputFormControl>
	   </Template_InputFormControls>
    </wssuc:InputFormSection>
    <wssuc:InputFormSection 
        Title="<%$Resources:szadm,CAMLHelper_OrderByLabel%>"
		Description="<%$Resources:szadm,CAMLHelper_OrderByDesc%>"
		runat="server">
	   <Template_InputFormControls>
			<wssuc:InputFormControl LabelText="<%$Resources:szadm,CAMLHelper_SortLabel%>" runat="server">
				 <Template_Control>
				    <asp:RadioButtonList ID="rbSortOrder" runat="server" RepeatDirection="Horizontal" RepeatLayout="flow">
                        <asp:ListItem Text="Descending" Value="Desc" Selected="True" />
                        <asp:ListItem Text="Ascending" Value="Asc" />
                    </asp:RadioButtonList><br />
                    <asp:Button CssClass="ms-ButtonHeightWidth" Enabled="false" ID="CmdAddOrder" runat="server" Text="<%$Resources:szadm,CAMLHelper_CmdAddOrder%>" OnClick="cmdAddOrder_Click" />
	            </Template_Control>
			</wssuc:InputFormControl>
	   </Template_InputFormControls>
    </wssuc:InputFormSection>
    <wssuc:InputFormSection 
        Title="<%$Resources:szadm,CAMLHelper_QryOutLabel%>"
		Description="<%$Resources:szadm,CAMLHelper_QryOutDesc%>"
		runat="server">
	   <Template_InputFormControls>
			<wssuc:InputFormControl LabelText="<%$Resources:szadm,CAMLHelper_QryOutLabel%>" runat="server">
				 <Template_Control>
				    <asp:literal ID="litOutput" runat="server" />
				    <asp:TextBox ID="txtQueryXMLRaw" runat="server" Visible="false" /><br />
				    <asp:Button CssClass="ms-ButtonHeightWidth" Enabled="false" ID="CmdTest" runat="server" Text="<%$Resources:szadm,CAMLHelper_CmdTest%>" OnClick="cmdTest_Click" />&nbsp;
				    <asp:Button CssClass="ms-ButtonHeightWidth" Enabled="false" ID="CmdClear" runat="server" Text="<%$Resources:szadm,CAMLHelper_CmdClear%>" OnClick="cmdClear_Click" />
				 </Template_Control>
			</wssuc:InputFormControl>
			<wssuc:InputFormControl LabelText="<%$Resources:szadm,CAMLHelper_ResLabel%>" runat="server" Id="inputTestRes" Visible="False" EnableViewState="false">
				 <Template_Control>
				    <SharePoint:SPGridView ID="GvResults" runat="server" AutoGenerateColumns="false" EnableViewState="false" />
				 </Template_Control>
			</wssuc:InputFormControl>
	   </Template_InputFormControls>
    </wssuc:InputFormSection>
    <wssuc:ButtonSection runat="server" ShowStandardCancelButton="False">
	   <Template_Buttons>
		  <asp:Button UseSubmitBehavior="false" runat="server" CssClass="ms-ButtonHeightWidth" OnClick="BtnUpdate_Click" Text="<%$Resources:wss,multipages_savebutton_text%>" id="BtnSave" accesskey="<%$Resources:wss,okbutton_accesskey%>" CausesValidation="true"/>
	   </Template_Buttons>
    </wssuc:ButtonSection>
 </table>
</asp:Content>